Repository navigation
Pack and check the release tarballs with GNU tar in a Linux container - #852
Merged
Merged
Conversation
This was referenced Nov 26, 2026
wu-sheng
force-pushed
the
release-tar-in-linux
branch
from
November 26, 2026 10:51
ff1476f to
e07bf21
Compare
wu-sheng
force-pushed
the
release-tar-in-linux
branch
from
November 26, 2026 11:23
e07bf21 to
4882057
Compare
stage packs the source and binary tarballs with tools/releasing/linux-tar.sh, which runs GNU tar in a pinned Linux image instead of the host's tar, and unpacks each with GNU tar in that image before signing it, stopping on any tar warning or any AppleDouble `._*` file. The Maven build and the signing stay on the host. The tar, gpg and shasum lines move from the Makefile's `dist` target, which only stage used, into stage, which now runs `make build`. Preflight requires Docker with its daemon running. The 9.8.0 tarballs were packed on macOS. COPYFILE_DISABLE=1 (#828) kept the `._*` entries out, but tar still stored each file's com.apple.provenance attribute as a pax header, on all 217 entries of the binary tarball and all 13,705 of the source tarball, and GNU tar prints "Ignoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'" once per entry (apache/skywalking#14271). The container does not see macOS attributes and GNU tar creates no `._*` entries, so there is no host flag left to forget. linux-tar.sh is one file, kept identical in the release scripts of skywalking, skywalking-java, skywalking-mcp, skywalking-swck, skywalking-helm, skywalking-client-js and skywalking-nodejs.
wu-sheng
force-pushed
the
release-tar-in-linux
branch
from
November 26, 2026 12:44
4882057 to
69fa70e
Compare
wankai123
approved these changes
Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the release tarballs carrying macOS extended attributes (apache/skywalking#14271)
Why
The 9.8.0 tarballs were packed on macOS. #828 set
COPYFILE_DISABLE=1, which keeps out the AppleDouble._*entries, but macOStarstill stored each file'scom.apple.provenanceattribute as an extended header: all 217 entries of the binary tarball and all 13,705 of the source tarball carry one. GNU tar does not know the header, so unpacking on Linux printsIgnoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'once per entry. The agent itself is fine: on RHEL 9.9 with GNU tar 1.34 the binary tarball prints 217 warnings, exits 0, and its 207 files come out byte-identical to the archive's.On macOS,
tarcan store a file's extended attributes (such ascom.apple.provenance) in two ways: as an AppleDouble._*entry beside the file, unlessCOPYFILE_DISABLE=1is set, and as extended (pax) headers. GNU tar on Linux unpacks each._*entry as a stray file, and printsIgnoring unknown extended header keyword 'LIBARCHIVE.xattr.com.apple.provenance'for each such header. Each of these repositories packed its release tarballs with its owntarcommand on the release manager's machine, so each earlier fix was a different set of host flags, and a release was only as clean as the flags its repository happened to have.What changes
linux-tar.shruns GNU tar in a pinned Linux image (debian:bookworm-slim, pinned by its multi-arch digest). The container does not see macOS attributes and GNU tar creates no._*entries, so there is no host flag left to forget. Onlytarruns in the container; builds, GPG signing and checksums stay on the release manager's machine. It has three commands:check: Docker is installed and its daemon is running.pack <dir> <tar arguments>: runs GNU tar with<dir>as its working directory.verify <tarball>...: unpacks each tarball with GNU tar in a fresh container from the same image, the way a Linux user would, and fails on any tar warning or any._*file.In this repository:
release.sh stagepacks the source tarball and the binary tarball (skywalking-agent/) withlinux-tar.sh pack, and runslinux-tar.sh verifyon each before signing it.tar,gpgandshasumlines move out of the Makefile'sdisttarget intostage, which now runsmake build.stagewas the only caller ofdist, sodistis removed.preflightrunslinux-tar.sh check, so a missing Docker fails before the long Maven build.CHANGES.mddescribe it.How it was verified (macOS, Docker Desktop)
On a clone at
v9.8.0, the new source command packs exactly the same 13,703 entries as the old command, and repacking the 9.8.0skywalking-agent/directory gives exactly the published binary tarball's 217 entries. Neither has extended-attribute headers, and both unpack on RHEL with no warnings.The changed lines of
stage, run withmake buildand gpg stubbed, produce both tarballs, their signatures and checksums.verifyfails both published 9.8.0 tarballs.If this pull request closes/resolves/fixes an existing issue, replace the issue number. Reported in discussion Java-Agent 9.8 binary distribution (tarball) contains macOS metadata skywalking#14271.
Update the
CHANGESlog.The same change, with the same
linux-tar.sh: apache/skywalking#14272, apache/skywalking-mcp#48, apache/skywalking-swck#240, apache/skywalking-helm#208, apache/skywalking-client-js#202, apache/skywalking-nodejs#150.